package main

import "strconv"

func main() {

}

func getHint(secret string, guess string) string {
	bulls := 0
	cows := 0
	s := make(map[uint8]int)
	g := make(map[uint8]int)
	for i := range secret {
		if secret[i] == guess[i] {
			bulls++
			continue
		}
		s[secret[i]]++
		g[guess[i]]++
	}
	for k := range s {
		if g[k] > 0 {
			cows += min(s[k], g[k])
			continue
		}
	}
	return strconv.Itoa(bulls) + "A" + strconv.Itoa(cows) + "B"
}
func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}
